#include <iostream>
using namespace std;
#include "exchangerate.hpp"


 int main()

{ int choice;
  float amount;
   float rate;
   char currency;
   char currencyto;
   // amount
/*   if( amount < 0)
     {
        return 1;
     }
*/
//   Converter money(amount);

   // convert from - switch statement
   //money.createRupees();
   //
   

   // convert to - switch statement
   //if dollar: std::cout<<"Amount in dollars = "<<money.dollar.amount<<endl;;
   cout << "Enter the value of the amount"<< endl;
   cin >> amount;
	
   if (amount < 0)
      { 
         return 1;
      }
      else
      {
         Converter money={amount,rate};
			
      cout <<"please choose from following list to convert amount from" << endl
           << "1 Rupee"<< endl
           <<"2 Euro" << endl
           <<"3 Pound"<< endl
           <<"4 Dollar"<< endl
           <<"5 your choice"<< endl;
			
       cin >> choice;
      
			
				 switch (choice)
       {
         case 1:
          money.createRupees();
            break;
			case 2:
				money.createEuro();
            break;
			case 3:
				money.createPound();
            break;
			case 4:
				money.createDollar();
          		break;
         	default:
         	cout << "Enter the currency from of your choice"<< endl;
         	cin >> currency;
				cout << " enter the value of rate" << endl;
				cin >> rate;
				money.createCurrency();
			   }      
				cout << " convert amount to"<< endl
         	<< " 10 Rupee"<< endl
         	<<"11 Euro" << endl
         	<<"12 Pound"<< endl
         	<<"13 Dollar"<< endl
        	 	<<"14 your own"<<endl;
         	
         
         cin >> choice;
         switch (choice)
         { 
				case 10:
				cout << " amount in rupee =" << money.rupee.value << endl;
               break;
				case 11:
				cout << " amount in Euro =" << money.euro.value<< endl;
               break;
			   case 12:
				cout << " amount in Pound =" << money.pound.value << endl;
               break;
				case 13:
         std::cout << " amount in dollars =" << money.dollar.value<< endl;
				case 14:
					cout << "enter amount to="<< endl;
					cin >> currencyto;
					/*cout << " enter the value of rate" << endl;
				cin >> rate;*/
					cout << " the amoun in "<< currencyto<< "="<< money.curr.ans<< endl;
               break;
         default:
         cout << " wrong choice";
         }
			}	
				
					
   return 0;
  
 }     

